import request from '@/utils/request'

// 查询桌码列表
export function listTable(query) {
  return request({
    url: '/scancode/table/list',
    method: 'get',
    params: query
  })
}

// 查询桌码详细
export function getTable(id) {
  return request({
    url: '/scancode/table/getInfo/' + id,
    method: 'get'
  })
}

// 新增桌码
export function addTable(data) {
  return request({
    url: '/scancode/table',
    method: 'post',
    data: data
  })
}

// 修改桌码
export function updateTable(data) {
  return request({
    url: '/scancode/table/edit',
    method: 'post',
    data: data
  })
}

// 删除桌码
export function delTable(id) {
  return request({
    url: '/scancode/table/del/' + id,
    method: 'post'
  })
}

// 导出桌码
export function exportTable(query) {
  return request({
    url: '/scancode/table/export',
    method: 'get',
    params: query
  })
}
